﻿/*
 * EmeCoder v1.2.1.168
 * 作者：Administrator/JOC-PC
 * 时间：2013-12-16 16:31:20
 * 版权：版权所有 (C) Eme Development Team 2013
*/

﻿using System;
using System.ComponentModel;
using HmFramework.Data;
using HmFramework.Data.Configuration;
using HmFramework.Data.DataAccessLayer;

namespace CuteSprite.Eme.Data.Settlement
{
	/// <summary>计费方案</summary>
	[Serializable]
	[DataObject]
	[Description("计费方案")]
	[BindIndex("IX_BillingSolutionID_SBGR", true, "SettlementSolutionID,BusinessCategory,GoodsCategory,Region")]
	[BindIndex("PK__BillingSolutionID__DB048CC9707C8D7C", true, "ID")]
	[BindRelation("SettlementSolutionID", false, "SettlementSolution", "ID")]
	[BindTable("BillingSolution", Description = "计费方案", ConnName = "EmeSettlement", DbType = DatabaseType.SqlServer)]
	public abstract partial class BillingSolution<TEntity> : IBillingSolution
	{
		#region 属性

		private Int32 _ID;

		/// <summary>主键</summary>
		[DisplayName("主键")]
		[Description("主键")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "主键", null, "int", 10, 0, false)]
		public virtual Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } }
		}

		private Int32 _SettlementSolutionID;

		/// <summary>公布价方案</summary>
		[DisplayName("公布价方案")]
		[Description("公布价方案")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(2, "SettlementSolutionID", "公布价方案", null, "int", 10, 0, false)]
		public virtual Int32 SettlementSolutionID
		{
			get { return _SettlementSolutionID; }
			set { if (OnPropertyChanging(__.SettlementSolutionID, value)) { _SettlementSolutionID = value; OnPropertyChanged(__.SettlementSolutionID); } }
		}

		private Int32 _BusinessCategory;

		/// <summary>业务类别</summary>
		[DisplayName("业务类别")]
		[Description("业务类别")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(3, "BusinessCategory", "业务类别", null, "int", 10, 0, false)]
		public virtual Int32 BusinessCategory
		{
			get { return _BusinessCategory; }
			set { if (OnPropertyChanging(__.BusinessCategory, value)) { _BusinessCategory = value; OnPropertyChanged(__.BusinessCategory); } }
		}

		private Int32 _GoodsCategory;

		/// <summary>货物类别</summary>
		[DisplayName("货物类别")]
		[Description("货物类别")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(4, "GoodsCategory", "货物类别", null, "int", 10, 0, false)]
		public virtual Int32 GoodsCategory
		{
			get { return _GoodsCategory; }
			set { if (OnPropertyChanging(__.GoodsCategory, value)) { _GoodsCategory = value; OnPropertyChanged(__.GoodsCategory); } }
		}

		private String _Region;

		/// <summary>地区</summary>
		[DisplayName("地区")]
		[Description("地区")]
		[DataObjectField(false, false, false, 20)]
		[BindColumn(5, "Region", "地区", null, "nvarchar(20)", 0, 0, true)]
		public virtual String Region
		{
			get { return _Region; }
			set { if (OnPropertyChanging(__.Region, value)) { _Region = value; OnPropertyChanged(__.Region); } }
		}

		private Int32 _AdditionalChargesID;

		/// <summary>附加费用</summary>
		[DisplayName("附加费用")]
		[Description("附加费用")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(6, "AdditionalChargesID", "附加费用", null, "int", 10, 0, false)]
		public virtual Int32 AdditionalChargesID
		{
			get { return _AdditionalChargesID; }
			set { if (OnPropertyChanging(__.AdditionalChargesID, value)) { _AdditionalChargesID = value; OnPropertyChanged(__.AdditionalChargesID); } }
		}

		private Int32 _BillingPriceID;

		/// <summary>计费价格</summary>
		[DisplayName("计费价格")]
		[Description("计费价格")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(7, "BillingPriceID", "计费价格", null, "int", 10, 0, false)]
		public virtual Int32 BillingPriceID
		{
			get { return _BillingPriceID; }
			set { if (OnPropertyChanging(__.BillingPriceID, value)) { _BillingPriceID = value; OnPropertyChanged(__.BillingPriceID); } }
		}

		private DateTime _ModifiedOn;

		/// <summary>修改时间</summary>
		[DisplayName("修改时间")]
		[Description("修改时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(8, "ModifiedOn", "修改时间", null, "datetime", 3, 0, false)]
		public virtual DateTime ModifiedOn
		{
			get { return _ModifiedOn; }
			set { if (OnPropertyChanging(__.ModifiedOn, value)) { _ModifiedOn = value; OnPropertyChanged(__.ModifiedOn); } }
		}

		private Int32 _ModifiedUserID;

		/// <summary>修改用户ID</summary>
		[DisplayName("修改用户ID")]
		[Description("修改用户ID")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(9, "ModifiedUserID", "修改用户ID", null, "int", 10, 0, false)]
		public virtual Int32 ModifiedUserID
		{
			get { return _ModifiedUserID; }
			set { if (OnPropertyChanging(__.ModifiedUserID, value)) { _ModifiedUserID = value; OnPropertyChanged(__.ModifiedUserID); } }
		}

		private String _ModifiedBy;

		/// <summary>修改用户</summary>
		[DisplayName("修改用户")]
		[Description("修改用户")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(10, "ModifiedBy", "修改用户", null, "nvarchar(50)", 0, 0, true)]
		public virtual String ModifiedBy
		{
			get { return _ModifiedBy; }
			set { if (OnPropertyChanging(__.ModifiedBy, value)) { _ModifiedBy = value; OnPropertyChanged(__.ModifiedBy); } }
		}

		private DateTime _CreateOn;

		/// <summary>创建时间</summary>
		[DisplayName("创建时间")]
		[Description("创建时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(11, "CreateOn", "创建时间", null, "datetime", 3, 0, false)]
		public virtual DateTime CreateOn
		{
			get { return _CreateOn; }
			set { if (OnPropertyChanging(__.CreateOn, value)) { _CreateOn = value; OnPropertyChanged(__.CreateOn); } }
		}

		private Int32 _CreateUserID;

		/// <summary>创建用户ID</summary>
		[DisplayName("创建用户ID")]
		[Description("创建用户ID")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(12, "CreateUserID", "创建用户ID", null, "int", 10, 0, false)]
		public virtual Int32 CreateUserID
		{
			get { return _CreateUserID; }
			set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } }
		}

		private String _CreateBy;

		/// <summary>创建用户</summary>
		[DisplayName("创建用户")]
		[Description("创建用户")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(13, "CreateBy", "创建用户", null, "nvarchar(50)", 0, 0, true)]
		public virtual String CreateBy
		{
			get { return _CreateBy; }
			set { if (OnPropertyChanging(__.CreateBy, value)) { _CreateBy = value; OnPropertyChanged(__.CreateBy); } }
		}

		#endregion

		#region 获取/设置 字段值

		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case __.ID: return _ID;
					case __.SettlementSolutionID: return _SettlementSolutionID;
					case __.BusinessCategory: return _BusinessCategory;
					case __.GoodsCategory: return _GoodsCategory;
					case __.Region: return _Region;
					case __.AdditionalChargesID: return _AdditionalChargesID;
					case __.BillingPriceID: return _BillingPriceID;
					case __.ModifiedOn: return _ModifiedOn;
					case __.ModifiedUserID: return _ModifiedUserID;
					case __.ModifiedBy: return _ModifiedBy;
					case __.CreateOn: return _CreateOn;
					case __.CreateUserID: return _CreateUserID;
					case __.CreateBy: return _CreateBy;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case __.ID: _ID = Convert.ToInt32(value); break;
					case __.SettlementSolutionID: _SettlementSolutionID = Convert.ToInt32(value); break;
					case __.BusinessCategory: _BusinessCategory = Convert.ToInt32(value); break;
					case __.GoodsCategory: _GoodsCategory = Convert.ToInt32(value); break;
					case __.Region: _Region = Convert.ToString(value); break;
					case __.AdditionalChargesID: _AdditionalChargesID = Convert.ToInt32(value); break;
					case __.BillingPriceID: _BillingPriceID = Convert.ToInt32(value); break;
					case __.ModifiedOn: _ModifiedOn = Convert.ToDateTime(value); break;
					case __.ModifiedUserID: _ModifiedUserID = Convert.ToInt32(value); break;
					case __.ModifiedBy: _ModifiedBy = Convert.ToString(value); break;
					case __.CreateOn: _CreateOn = Convert.ToDateTime(value); break;
					case __.CreateUserID: _CreateUserID = Convert.ToInt32(value); break;
					case __.CreateBy: _CreateBy = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}

		#endregion

		#region 字段名

		/// <summary>取得计费方案字段信息的快捷方式</summary>
		public partial class _
		{
			///<summary>主键</summary>
			public static readonly Field ID = FindByName(__.ID);

			///<summary>公布价方案</summary>
			public static readonly Field SettlementSolutionID = FindByName(__.SettlementSolutionID);

			///<summary>业务类别</summary>
			public static readonly Field BusinessCategory = FindByName(__.BusinessCategory);

			///<summary>货物类别</summary>
			public static readonly Field GoodsCategory = FindByName(__.GoodsCategory);

			///<summary>地区</summary>
			public static readonly Field Region = FindByName(__.Region);

			///<summary>附加费用</summary>
			public static readonly Field AdditionalChargesID = FindByName(__.AdditionalChargesID);

			///<summary>计费价格</summary>
			public static readonly Field BillingPriceID = FindByName(__.BillingPriceID);

			///<summary>修改时间</summary>
			public static readonly Field ModifiedOn = FindByName(__.ModifiedOn);

			///<summary>修改用户ID</summary>
			public static readonly Field ModifiedUserID = FindByName(__.ModifiedUserID);

			///<summary>修改用户</summary>
			public static readonly Field ModifiedBy = FindByName(__.ModifiedBy);

			///<summary>创建时间</summary>
			public static readonly Field CreateOn = FindByName(__.CreateOn);

			///<summary>创建用户ID</summary>
			public static readonly Field CreateUserID = FindByName(__.CreateUserID);

			///<summary>创建用户</summary>
			public static readonly Field CreateBy = FindByName(__.CreateBy);

			private static Field FindByName(String name)
			{
				return Meta.Table.FindByName(name);
			}
		}

		/// <summary>取得计费方案字段名称的快捷方式</summary>
		public partial class __
		{
			///<summary>主键</summary>
			public const String ID = "ID";

			///<summary>公布价方案</summary>
			public const String SettlementSolutionID = "SettlementSolutionID";

			///<summary>业务类别</summary>
			public const String BusinessCategory = "BusinessCategory";

			///<summary>货物类别</summary>
			public const String GoodsCategory = "GoodsCategory";

			///<summary>地区</summary>
			public const String Region = "Region";

			///<summary>附加费用</summary>
			public const String AdditionalChargesID = "AdditionalChargesID";

			///<summary>计费价格</summary>
			public const String BillingPriceID = "BillingPriceID";

			///<summary>修改时间</summary>
			public const String ModifiedOn = "ModifiedOn";

			///<summary>修改用户ID</summary>
			public const String ModifiedUserID = "ModifiedUserID";

			///<summary>修改用户</summary>
			public const String ModifiedBy = "ModifiedBy";

			///<summary>创建时间</summary>
			public const String CreateOn = "CreateOn";

			///<summary>创建用户ID</summary>
			public const String CreateUserID = "CreateUserID";

			///<summary>创建用户</summary>
			public const String CreateBy = "CreateBy";
		}

		#endregion
	}

	/// <summary>计费方案接口</summary>
	public partial interface IBillingSolution
	{
		#region 属性

		/// <summary>主键</summary>
		Int32 ID { get; set; }

		/// <summary>公布价方案</summary>
		Int32 SettlementSolutionID { get; set; }

		/// <summary>业务类别</summary>
		Int32 BusinessCategory { get; set; }

		/// <summary>货物类别</summary>
		Int32 GoodsCategory { get; set; }

		/// <summary>地区</summary>
		String Region { get; set; }

		/// <summary>附加费用</summary>
		Int32 AdditionalChargesID { get; set; }

		/// <summary>计费价格</summary>
		Int32 BillingPriceID { get; set; }

		/// <summary>修改时间</summary>
		DateTime ModifiedOn { get; set; }

		/// <summary>修改用户ID</summary>
		Int32 ModifiedUserID { get; set; }

		/// <summary>修改用户</summary>
		String ModifiedBy { get; set; }

		/// <summary>创建时间</summary>
		DateTime CreateOn { get; set; }

		/// <summary>创建用户ID</summary>
		Int32 CreateUserID { get; set; }

		/// <summary>创建用户</summary>
		String CreateBy { get; set; }

		#endregion

		#region 获取/设置 字段值

		/// <summary>获取/设置 字段值。</summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		Object this[String name] { get; set; }

		#endregion
	}
}